//此文件用来配置环境变量
const dotenv = require("dotenv");
//执行该函数会自动将.env文件中的变量添加到process.env
dotenv.config();

const fs = require("fs");

const PRIVATE_KEY = fs.readFileSync("src/app/keys/private.key");
const PUBLIC_KEY = fs.readFileSync("src/app/keys/public.key");

console.log(process.env.APP_PORT);
module.exports = {
  APP_PORT,
  MYSQL_HOST,
  MYSQL_PORT,
  MYSQL_DATABASE,
  MYSQL_ROOT,
  MYSQL_PASSWORD,
} = process.env;

module.exports.PRIVATE_KEY = PRIVATE_KEY;
module.exports.PUBLIC_KEY = PUBLIC_KEY;
